<?php
//This class repersents the Dashboard shown to the admin
//provides the html bar showing the Dashboard
require_once('./inc/database.php');
require_once('./inc/functions.php');
 db_connect();

class dashboard
{

public static function get_html_bash()
{?>
 	  <div  id="reports">
           <p class="color_turkiz"> מידע מערכת</p>
          <div id="dashboard"> 
          <div id="in_order" class="report">
           <span class="color_turkiz title" >  פרויקטים בהזמנה </span>
           <span class="icon"></span> 
           <span class="color_turkiz num" ><?php echo project::get_in_development(1); ?></span>
          </div>
          <div id="in_development" class="report">
          	 <span class="color_turkiz title" >  פרויקטים בעבודה</span> 
             <span class="icon"></span>
             <span class="color_turkiz num" ><?php echo project::get_in_development(2); ?></span>
          </div>
           
           <div id="in_Produced" class="report">
               <span class="color_turkiz title">  פרויקטים שהסתימו</span> 
               <span class="icon"></span>
               <span class="color_turkiz num"><?php echo project::get_in_development(3); ?></span>
          </div>
          
           
          <div id="in_new" class="report">
            <span class="color_turkiz title"> פניות חדשות</span>
            <span class="icon"></span>
            <span  class="color_turkiz num" ><?php echo task::get_task_Treatment(1); ?></span>
         </div>
            
          <div id="in_treatment" class="report">
         	  <span class="color_turkiz title">  פניות בטיפול</span>
              <span class="icon"></span>
              <span class="color_turkiz num"><?php  $x=task::get_task_treatment(3);$y=task::get_task_treatment(2); echo $x+$y; ?></span>
          </div>
          
          <div id="in_finish" class="report">
              <span class="color_turkiz title">  פניות שטופלו</span> 
              <span class="icon"></span>
              <span class="color_turkiz num"><?php  echo task::get_task_treatment(4); ?></span>
          </div>
        
        
       		</div><!--dashboard-->
        </div><!--reports-->
        <script>
           $(document).ready(function(e) {
            $('#in_order').click(function(e) {
                get_from_dashboard(6);
            });
		    $('#in_development').click(function(e) {
                get_from_dashboard(1);
            });
			$('#in_Produced').click(function(e) {
                get_from_dashboard(2);
            });
			$('#in_new').click(function(e) {
                get_from_dashboard(3);
            });
			$('#in_treatment').click(function(e) {
                get_from_dashboard(4);
            });
			$('#in_finish').click(function(e) {
                get_from_dashboard(5);
            });
        });
        
        </script>
<?php }
	
	
}

?>